namespace Terra.Core.Common.ErrorCodes.Constants;

using Terra.Core.Common.ErrorCodes.Attributes;
using Terra.Core.Common.ErrorCodes.Models;

/// <summary>
/// 系统错误码
/// </summary>
public static class SystemErrorCodes
{
    /// <summary>
    /// 系统错误
    /// </summary>
    [ErrorCode("SYS001", "系统错误", Severity = ErrorSeverity.Critical)]
    public const string SystemError = "SYS001";

    /// <summary>
    /// 服务不可用
    /// </summary>
    [ErrorCode("SYS002", "服务暂时不可用", Severity = ErrorSeverity.Critical)]
    public const string ServiceUnavailable = "SYS002";

    /// <summary>
    /// 参数验证失败
    /// </summary>
    [ErrorCode("SYS003", "参数验证失败: {0}", Severity = ErrorSeverity.Error)]
    public const string ValidationFailed = "SYS003";

    /// <summary>
    /// 未授权访问
    /// </summary>
    [ErrorCode("SYS004", "未授权访问", Severity = ErrorSeverity.Error)]
    public const string Unauthorized = "SYS004";

    /// <summary>
    /// 访问被拒绝
    /// </summary>
    [ErrorCode("SYS005", "访问被拒绝", Severity = ErrorSeverity.Error)]
    public const string Forbidden = "SYS005";

    /// <summary>
    /// 资源不存在
    /// </summary>
    [ErrorCode("SYS006", "请求的资源不存在", Severity = ErrorSeverity.Error)]
    public const string NotFound = "SYS006";
}